﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;

using System.Collections.Generic;

using TerminologiaSinacor.Presenter;

public partial class page_Fontes : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
            Fontes fontes = new Fontes();
            //fontes.Modulo = Request.Params["Modulo"];
            //fontes.Fonte = Request.Params["Fonte"];
            fontes.NomeTermo = Request.Params["NomeTermo"];

            this.ViewState["FontesFiltro"] = fontes;
            BindingGrid(fontes); 
    }

    private void BindingGrid(Fontes fontes)
    {
        List<Fontes> fontess = new List<Fontes>();
        fontess = fontes.search(fontes);
        GrdFontes.DataSource = fontess; 
        GrdFontes.DataBind();
    }

    protected void GrdFontes_PageIndexChanging(object sender, GridViewPageEventArgs e)
    {
        Fontes fontes = (Fontes)ViewState["FontesFiltro"];
        this.GrdFontes.PageIndex = e.NewPageIndex;
        BindingGrid(fontes);
    }

}
